<template>
  <view class="filling_List" v-for="(item) in orderLists" :key="item.id" @click="RouteJump(item.id)">
    <text
      class="fill_text"
      :style="{
        background: item.status_text == '已完成' ? '#ECECEC' : '',
        color: item.status_text == '已完成' ? '#333' : '',
      }"
      v-if="props.status"
    >
      {{ item.status_text }}
    </text>
    <view class="filling_List_1">
      <text>订单号：{{ item.order_sn }}</text>
    </view>
    <view class="filling_List_1" style="margin: 15rpx 0px">
      <text>{{ item.product_name }}</text>
      <text>{{ item.fill_amount }}公斤</text>
    </view>
    <view class="filling_List_3">
      <view v-if="item.order_type !== 'customers_filling'">{{ item.fill_price }}元/公斤</view>
      <view v-else></view>
      <view>
        <text>消费金额￥</text>
        <text style="font-size: 30rpx">{{ item.fill_fee }}</text>
      </view>
    </view>
    <view class="filling_List_3" style="margin-top: 20rpx">
      <view>{{ item.createtime }}</view>
      <view>
        <text style="margin-left: 20rpx">{{ item.cart_code }}</text>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
import { navTo } from '@/utils/navigator';
import { PropType } from 'vue';

const props = defineProps({
  orderLists: {
    type: Array as PropType<Array<any>>,
  },
  status: {
    type: Boolean,
  },
});
function RouteJump(id: number) {
  navTo(`order/orderDetail?id=${id}`);
}
</script>

<style scoped lang="less">
@import url('../order/less/fillingList.less');
</style>
